import { GCellRenderer } from "../../../../com/mui/controls/GCellRenderer";
import { GlobalClass } from "../../../../com/mui/core/GlobalClass";
import { ImagesConst } from "../../resource/ImagesConst";
import { LoaderHelp } from "../../../common/display/LoaderHelp";
import { ResFileConst } from "../../resource/ResFileConst";
type int = number;
//class ColorListRenderer
    
    export  class ColorListRenderer extends GCellRenderer
    {
        constructor()
        {
            super();
            this._imgArr = ["Yellow", "Red"];
            this.initItem();
            return;
        }

        /* internal  */initItem(): void
        {
            this._color = new Object /* flash.display.Bitmap */();
            this._color.x = 13;
            addChild(this._color);
            return;
        }

        protected onSelect(arg1: Object /* flash.events.Event */): void
        {
            return;
        }

        /* internal  */onResLoaded(): void
        {
            this._color.bitmapData = GlobalClass.getBitmapData(ImagesConst["ZodiacColor" + this._imgArr[this._index]]);
            return;
        }

        public /* override */ set data(arg1: Object)
        {
            super.data = arg1;
            this._index = data.index;
            LoaderHelp.addResCallBack(ResFileConst.Zodiac, this.onResLoaded);
            return;
        }

        /* internal */ /* var */_color: Object /* flash.display.Bitmap */;

        /* internal */ /* var */_imgArr: Array<any>;

        /* internal */ /* var */_index: int;
    }
